using System;

namespace msilgc.driver.cuda.Compilers
{
	internal static class CompilerFactory
	{
		public static INativeCompiler Create() {
			switch (Environment.OSVersion.Platform) {
				case PlatformID.Win32S:
				case PlatformID.Win32Windows:
				case PlatformID.Win32NT:
					return new MicrosoftCpp();
				case PlatformID.Unix:
				case PlatformID.MacOSX:
					return new UnixCpp();
				default:
					throw new SystemException("platform is not supported");
			}
		}
	}
}